<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="scripts/funciones.js"></script>
<script type="text/javascript" src="scripts/validar_registro.js"></script>
<sj:head locale="es" jqueryui="true" jquerytheme="cupertino" />
<link rel="stylesheet" type="text/css" href="estilo/style.css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Venta Tarjetas Movilpay...</title>
<script language="JavaScript" type="text/javascript">	

   function maximizar() { 
		self.moveTo(0,0); 
		self.resizeTo(screen.availWidth,screen.availHeight); 
	} 
   $.subscribe('validarRegistroVentaTar', function(event,data) {
  	 try{
		    var fData = event.originalEvent.formData;
		    if ( validar_venta_tarjeta() ==false){
		    	event.originalEvent.options.submit = false;
		    	return 0;
		    }
		    document.getElementById('btn_guardar').disabled=true;
		    event.originalEvent.options.submit = true; 
  	 }catch(err){
  		 alert(err);
  	 }    
	});
    $.subscribe('validarRegistroVentaTar2', function(event,data) {
	  	 try{
			    var fData = event.originalEvent.formData;
			    if ( validar_venta_tarjeta2() ==false){
			    	event.originalEvent.options.submit = false;
			    	return 0;
			    }
			    document.getElementById('btn_guardar2').disabled=true;
			    event.originalEvent.options.submit = true; 
	  	 }catch(err){
	  		 alert(err);
	  	 }    
		});
    $.subscribe('validarRegistroVentaTar3', function(event,data) {
	  	 try{
			    var fData = event.originalEvent.formData;
			    if ( validar_venta_tarjeta3() ==false){
			    	event.originalEvent.options.submit = false;
			    	return 0;
			    }
			    document.getElementById('btn_guardar3').disabled=true;
			    event.originalEvent.options.submit = true; 
	  	 }catch(err){
	  		 alert(err);
	  	 }    
		});
    function sinComas(k){
	  	 var tecla = 0;
	  	 if(typeof (k.charCode) == 'undefined' ){
	  		 tecla = k.keyCode;
	  	 }else{
	  		 tecla = k.charCode;
	  	 }
	  	 if(tecla==0) return true;
	  	 if (tecla==44){
	  		  return false;
			/* tecla=46;	
			 if(typeof (k.charCode) == 'undefined' ){
		  		  k.keyCode=tecla;
		  	 }else{
		  		  k.charCode=tecla;
		  	 }*/
		 }
	  	 return true;
     } 

</script>
</head>
<body onload="maximizar(); " >
<sj:div  id="div_cuerpo_registro" align='center'  > 
  <div class='logo_sia'><img src="images/logo.png" /></div>
  <div class="barra_tit_corp" align='center'>Venta Tarjetas Movilpay...</div>
  <br><br><br><br><br>
   <table border="0"  width="70%">
	 <tr>
	     <td colspan="3">
			 
	     </td>
	     <tr>
			  <td class='tabla_th1'>Codigo de Barras</td>
			  <td class='tabla_th1'>Accion</td>
			  <td class='tabla_th1'></td>
		</tr>
  </table>		  
  <s:form name="form_vent_cod_tar" action="vender_tarjeta" theme="simple">
		  <table border="0"  width="70%">
			  <tr>
				  <td><sj:textfield name="codigobarras" id="codigobarras" size="35" maxlength="15" placeholder="Escriba Codigo de Barra Aqui" onkeypress="return soloNumeros(event);" onpaste='return false'  /> </td>
				  <td >
					<sj:submit onBeforeTopics='validarRegistroVentaTar' id='btn_guardar' name='btn_guardar' targets='div_fila_1' indicator='prog_registro1' button='true' value='Vender Tarjeta' theme='simple'  /> 
				  </td>
				  <td >
					 <img id='prog_registro1' src='images/pg2.gif' alt='Enviando...' style='display: none' />
					 <div id="div_fila_1" align='center'  > 
					 </div>
				  </td>
			  </tr>
		 </table>
   </s:form>  
   <s:form name="form_vent_cod_tar2" action="vender_tarjeta" theme="simple">
		  <table border="0"  width="70%">
			  <tr>
				  <td><sj:textfield name="codigobarras" id="codigobarras2" size="35" maxlength="15" placeholder="Escriba Codigo de Barra Aqui" onkeypress="return soloNumeros(event);" onpaste='return false' /> </td>
				  <td >
					<sj:submit onBeforeTopics='validarRegistroVentaTar2' id='btn_guardar2' name='btn_guardar' targets='div_fila_2' indicator='prog_registro2' button='true' value='Vender Tarjeta' theme='simple'  /> 
				  </td>
				  <td >
					 <img id='prog_registro2' src='images/pg2.gif' alt='Enviando...' style='display: none' />
					 <div id="div_fila_2" align='center'  > 
					 </div>
				  </td>
			  </tr>
		 </table>
   </s:form>  
   <s:form name="form_vent_cod_tar3" action="vender_tarjeta" theme="simple">
		  <table border="0"  width="70%">
			  <tr>
				  <td><sj:textfield name="codigobarras" id="codigobarras3" size="35" maxlength="15" placeholder="Escriba Codigo de Barra Aqui" onkeypress="return soloNumeros(event);"  onpaste='return false'   /> </td>
				  <td >
					<sj:submit onBeforeTopics='validarRegistroVentaTar3' id='btn_guardar3' name='btn_guardar' targets='div_fila_3' indicator='prog_registro3' button='true' value='Vender Tarjeta' theme='simple'  /> 
				  </td>
				  <td >
					 <img id='prog_registro3' src='images/pg2.gif' alt='Enviando...' style='display: none' />
					 <div id="div_fila_3" align='center'  > 
					 </div>
				  </td>
			  </tr>
		 </table>
   </s:form>  
</sj:div>
</body>
</html>